package hot100;

public class climbStairs2 {
    public int climbStairs(int n) {
        int q = 0,p = 0,r = 1;
        for(int i = 0;i < n;i++) {
            q = p;
            p = r;
            r = q + p;
        }
        return r;
    }
}
